using SqlSugar;
using IM.Easy.Core.Audit;

namespace IM.Easy.Entity.System
{
    /// <summary>
    /// 文件类型表
    /// </summary>
    [SugarTable("FileTypes")]
    public class FileTypes : IUpdated, ICreated, IActive
    {
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 主类别
        /// </summary>
        [SugarColumn(ColumnName = "group")]
        public string Group { get; set; }

        /// <summary>
        /// 类型名称
        /// </summary>
        [SugarColumn(ColumnName = "typeName")]
        public string TypeName { get; set; }

        /// <summary>
        /// 常见扩展名
        /// </summary>
        [SugarColumn(ColumnName = "extension", IsJson = true)]
        public List<string>? Extension { get; set; }

        /// <summary>
        /// MIME类型
        /// </summary>
        [SugarColumn(ColumnName = "mimeType")]
        public string MimeType { get; set; }

        /// <summary>
        /// 是否允许
        /// </summary>
        [SugarColumn(ColumnName = "isActive")]
        public bool IsActive { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [SugarColumn(ColumnName = "order")]
        public int Order { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        [SugarColumn(ColumnName = "icon")]
        public string? Icon { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [SugarColumn(ColumnName = "description", Length = 500)]
        public string? Description { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "createdAt")]
        public DateTime? CreatedAt { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "createdBy")]
        public long CreatedBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "updatedAt")]
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        [SugarColumn(ColumnName = "updatedBy")]
        public long UpdatedBy { get; set; }

    }
}
